package wx.utils
{
	import flash.display.DisplayObject;
	import flash.geom.ColorTransform;

	public class ColorUtil
	{
		//颜色变灰
		public static function disable(elem:DisplayObject):DisplayObject{
			elem.transform.colorTransform = new ColorTransform(0.5,0.5,0.5,1,100,100,100,1);
			return elem;
		}
		
		//颜色加亮
		public static function hover(elem:DisplayObject):DisplayObject{
			elem.transform.colorTransform = new ColorTransform(1,1,1,1,10,10,10,1);
			return elem;
		}
		
		//颜色加深
		public static function deepening(elem:DisplayObject):DisplayObject{
			elem.transform.colorTransform = new ColorTransform(1,1,1,1,-10,-10,-10,1);
			return elem;
		}
	}
}